package com.ysy.logistics.util;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * @ClassDescription: 分页查询信息
 * @Author:姚斯羽
 * @Create:2025/3/12 14:29
 **/
@Data
@Schema(name = "PageInfo",description = "分页查询信息")
@AllArgsConstructor
@NoArgsConstructor
public class PageInfo<T> implements Serializable {
    @Schema(description = "当前页")
    private int current;
    @Schema(description = "每页条数")
    private int size;
    @Schema(description = "开始日期")
    private LocalDate beginTime;
    @Schema(description = "结束日期")
    private LocalDate endTime;
    @Schema(description = "查询条件")
    private T criteria;

    public Page<T> getPage(){
        return new Page<T>(current,size);
    }


}
